home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / program / misc / tri14dev.lha / Triton / Developer / DemoSource / toolmanager3.c < prev    next >
C/C++ Source or Header  |  1995-08-25  |  3KB  |  139 lines

  1. /*
  2.  *  Triton - The object oriented GUI creation system for the Amiga
  3.  *  Written by Stefan Zeiger in 1993-1995
  4.  *
  5.  *  (c) 1993-1995 by Stefan Zeiger
  6.  *  You are hereby allowed to use this source or parts
  7.  *  of it for creating programs for AmigaOS which use the
  8.  *  Triton GUI creation system. All other rights reserved.
  9.  *
  10.  *  Toolmanager3.c - My own creation for a ToolManager GUI
  11.  *
  12.  */
  13.  
  14.  
  15. #include <stdio.h>
  16. #include <stdlib.h>
  17. #include <string.h>
  18.  
  19. #include <libraries/triton.h>
  20.  
  21. #ifdef __GNUC__
  22. #ifndef __OPTIMIZE__
  23. #include <clib/triton_protos.h>
  24. #else
  25. #include <inline/triton.h>
  26. #endif /* __OPTIMIZE__ */
  27. #else
  28. #include <proto/triton.h>
  29. #endif /* __GNUC__ */
  30.  
  31.  
  32. STRPTR cycle_entries[]={"Exec","Image","Sound","Menu","Icon","Dock","Access",NULL};
  33.  
  34. extern struct List LVList;
  35.  
  36. struct Node LVNodes[] =
  37. {
  38.   { &LVNodes[1], (struct Node *)&LVList.lh_Head,  0, 0, "2024view" },
  39.   { &LVNodes[2], &LVNodes[0],                     0, 0, "Add to archive" },
  40.   { &LVNodes[3], &LVNodes[1],                     0, 0, "Delete" },
  41.   { &LVNodes[4], &LVNodes[2],                     0, 0, "Edit text" },
  42.   { &LVNodes[5], &LVNodes[3],                     0, 0, "Env" },
  43.   { &LVNodes[6], &LVNodes[4],                     0, 0, "Exchange" },
  44.   { &LVNodes[7], &LVNodes[5],                     0, 0, "Global Help System" },
  45.   { &LVNodes[8], &LVNodes[6],                     0, 0, "Multiview" },
  46.   { (struct Node *)&LVList.lh_Tail, &LVNodes[7],  0, 0, "Paint" }
  47. };
  48.  
  49. struct List LVList={&LVNodes[0],NULL,&LVNodes[8],0,0};
  50.  
  51.  
  52. int main(void)
  53. {
  54.   if(TR_OpenTriton(TRITON11VERSION,TRCA_Name,"ToolManagerGUIDemo3",TRCA_LongName,"ToolManager GUI demo 3",TRCA_Info,"My own creation for a ToolManager GUI",TAG_END))
  55.   {
  56.     TR_AutoRequestTags(Application,NULL,
  57.       WindowID(1), WindowPosition(TRWP_CENTERDISPLAY),
  58.       WindowTitle("ToolManager GUI demo 3"),
  59.  
  60.       VertGroupA,
  61.  
  62.         Space,
  63.  
  64.         HorizGroupAC,
  65.           Space,
  66.           TextID("_Object type",1),
  67.           Space,
  68.           CycleGadget(cycle_entries,0,1),
  69.           Space,
  70.         EndGroup,
  71.  
  72.         Space,
  73.  
  74.         NamedSeparatorI("Object _list",2),
  75.  
  76.         Space,
  77.  
  78.         HorizGroupAC,
  79.           Space,
  80.             VertGroupAC,
  81.               ListSS(&LVList,2,0,0),
  82.               HorizGroupEA,
  83.                 Button("_New...",8),
  84.                 Button("_Edit...",9),
  85.               EndGroup,
  86.               HorizGroupEA,
  87.                 Button("Co_py",10),
  88.                 Button("Remove",11),
  89.               EndGroup,
  90.             EndGroup,
  91.           Space,
  92.           Line(TROF_VERT),
  93.           Space,
  94.             VertGroupA|TRGR_FIXHORIZ,
  95.               Button("Top",3),
  96.               Space,
  97.               Button("Up",4),
  98.               Space,
  99.               Button("Down",5),
  100.               Space,
  101.               Button("Bottom",6),
  102.               VertGroupS,Space,EndGroup,
  103.               Button("So_rt",7),
  104.             EndGroup,
  105.           Space,
  106.         EndGroup,
  107.  
  108.         Space,
  109.  
  110.         HorizSeparator,
  111.  
  112.         Space,
  113.  
  114.         HorizGroup,
  115.           Space,
  116.           HorizGroupS,
  117.             Button("_Save",12),
  118.             Space,
  119.             Button("_Use",13),
  120.             Space,
  121.             Button("_Test",14),
  122.             Space,
  123.             Button("_Cancel",15),
  124.           EndGroup,
  125.           Space,
  126.         EndGroup,
  127.  
  128.         Space,
  129.  
  130.       EndGroup,
  131.  
  132.       TAG_END);
  133.     TR_CloseTriton();
  134.     return 0;
  135.   }
  136.   puts("Can't open triton.library v2+.");
  137.   return 20;
  138. }
  139.